﻿<Application
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:HabilisDesign_Iota="clr-namespace:HabilisDesign.Iota;assembly=Core"
    xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic"
    x:Class="Iota.App"
    StartupUri="MainWindow.xaml"
    xmlns:Microsoft_Windows_Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna"
    >
    <Application.Resources>
    	<Style x:Key="ButtonFocusVisual">
    		<Setter Property="Control.Template">
    			<Setter.Value>
    				<ControlTemplate>
    					<Border>
    						<Rectangle SnapsToDevicePixels="true" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="4"/>
    					</Border>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="RoundButton" TargetType="{x:Type Button}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
    					<ControlTemplate.Resources>
    						<Storyboard x:Key="ButtonPress">
    							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Grid">
    								<SplineDoubleKeyFrame KeyTime="00:00:00.0200000" Value="0.6"/>
    							</DoubleAnimationUsingKeyFrames>
    						</Storyboard>
							<Storyboard x:Key="ButtonHover">
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
									<SplineColorKeyFrame KeyTime="00:00:00.0200000" Value="#FF343434"/>
								</ColorAnimationUsingKeyFrames>
							</Storyboard>
    					</ControlTemplate.Resources>
    					<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Stretch" x:Name="Grid" VerticalAlignment="Stretch">
    						<Grid.RenderTransform>
    							<TransformGroup>
    								<ScaleTransform ScaleX="1" ScaleY="1"/>
    								<SkewTransform AngleX="0" AngleY="0"/>
    								<RotateTransform Angle="0"/>
    								<TranslateTransform X="0" Y="0"/>
    							</TransformGroup>
    						</Grid.RenderTransform>
    						<Ellipse Stroke="{DynamicResource ElementBorderBrush}" StrokeThickness="3" Fill="{DynamicResource ElementBGBrush}" HorizontalAlignment="Stretch" Margin="0,0,0,0" Opacity="0.4" x:Name="ellipse" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Panel.ZIndex="0"/>
    						<Image HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" RenderTransformOrigin="0.5,0.5" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Grid.IsSharedSizeScope="False" Source="\images\Customize.ico" ScrollViewer.CanContentScroll="False" x:Name="image" Panel.ZIndex="0">
    							<Image.RenderTransform>
    								<TransformGroup>
    									<ScaleTransform ScaleX="0.6" ScaleY="0.6"/>
    									<SkewTransform AngleX="0" AngleY="0"/>
    									<RotateTransform Angle="0"/>
    									<TranslateTransform X="0" Y="0"/>
    								</TransformGroup>
    							</Image.RenderTransform>
    						</Image>
    					</Grid>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsMouseOver" Value="True" SourceName="Grid">
    							<Trigger.EnterActions>
    								<BeginStoryboard x:Name="ButtonHover_BeginStoryboard" Storyboard="{StaticResource ButtonHover}"/>
    							</Trigger.EnterActions>
    							<Trigger.ExitActions>
    								<RemoveStoryboard BeginStoryboardName="ButtonHover_BeginStoryboard"/>
    							</Trigger.ExitActions>
    						</Trigger>
    						<Trigger Property="IsPressed" Value="True">
    							<Trigger.EnterActions>
    								<BeginStoryboard x:Name="ButtonPress_BeginStoryboard" Storyboard="{StaticResource ButtonPress}"/>
    							</Trigger.EnterActions>
    							<Trigger.ExitActions>
    								<RemoveStoryboard BeginStoryboardName="ButtonPress_BeginStoryboard"/>
    							</Trigger.ExitActions>
    						</Trigger>
    						<Trigger Property="ToggleButton.IsChecked" Value="true"/>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="StatusUpdateBox" TargetType="{x:Type TextBox}">
    		<Setter Property="Padding" Value="1"/>
    		<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
    		<Setter Property="HorizontalContentAlignment" Value="Left"/>
    		<Setter Property="AllowDrop" Value="true"/>
			<Setter Property="Foreground" Value="#FFFFFFFF"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type TextBox}">
						<ControlTemplate.Resources>
							<Storyboard x:Key="GotFocus">
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
									<SplineColorKeyFrame KeyTime="00:00:00.0200000" Value="#FF343434"/>
								</ColorAnimationUsingKeyFrames>
    							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="rectangle">
    								<SplineDoubleKeyFrame KeyTime="00:00:00.0200000" Value="0.6"/>
    							</DoubleAnimationUsingKeyFrames>
							</Storyboard>
						</ControlTemplate.Resources>
    					<Grid>
    						<Rectangle x:Name="rectangle" Opacity=".4" StrokeThickness="3" Fill="{DynamicResource ElementBGBrush}" Stroke="{DynamicResource ElementBorderBrush}" RadiusX="8" RadiusY="8" Width="Auto" Height="Auto"/>
    						<ScrollViewer x:Name="PART_ContentHost" Margin="2,2,2,2"/>
    					</Grid>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    						<Trigger Property="IsFocused" Value="True">
    							<Trigger.EnterActions>
    								<BeginStoryboard x:Name="GotFocus_BeginStoryboard" Storyboard="{StaticResource GotFocus}"/>
    							</Trigger.EnterActions>
    							<Trigger.ExitActions>
    								<RemoveStoryboard BeginStoryboardName="GotFocus_BeginStoryboard"/>
    							</Trigger.ExitActions>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
		<Style x:Key="UserPasswordBox" TargetType="{x:Type PasswordBox}">
    		<Setter Property="Padding" Value="1"/>
    		<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
    		<Setter Property="HorizontalContentAlignment" Value="Left"/>
    		<Setter Property="AllowDrop" Value="true"/>
			<Setter Property="Foreground" Value="#FFFFFFFF"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type PasswordBox}">
						<ControlTemplate.Resources>
							<Storyboard x:Key="GotFocus">
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rectangle" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
									<SplineColorKeyFrame KeyTime="00:00:00.0200000" Value="#FF343434"/>
								</ColorAnimationUsingKeyFrames>
    							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="rectangle">
    								<SplineDoubleKeyFrame KeyTime="00:00:00.0200000" Value="0.6"/>
    							</DoubleAnimationUsingKeyFrames>
							</Storyboard>
						</ControlTemplate.Resources>
    					<Grid>
    						<Rectangle x:Name="rectangle" Opacity=".4" StrokeThickness="3" Fill="{DynamicResource ElementBGBrush}" Stroke="{DynamicResource ElementBorderBrush}" RadiusX="8" RadiusY="8" Width="Auto" Height="Auto"/>
    						<ScrollViewer x:Name="PART_ContentHost" Margin="2,2,2,2"/>
    					</Grid>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    						<Trigger Property="IsFocused" Value="True">
    							<Trigger.EnterActions>
    								<BeginStoryboard x:Name="GotFocus_BeginStoryboard" Storyboard="{StaticResource GotFocus}"/>
    							</Trigger.EnterActions>
    							<Trigger.ExitActions>
    								<RemoveStoryboard BeginStoryboardName="GotFocus_BeginStoryboard"/>
    							</Trigger.ExitActions>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
		<ControlTemplate x:Key="StatusItemTemplate" TargetType="{x:Type ListViewItem}">
			<ControlTemplate.Resources>
				        <Storyboard x:Key="Expander">
          <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="stackPanel" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
            <SplineDoubleKeyFrame KeyTime="00:00:00.0500000" Value="1.1"/>
          </DoubleAnimationUsingKeyFrames>
          <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="stackPanel" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
            <SplineDoubleKeyFrame KeyTime="00:00:00.0500000" Value="1.1"/>
          </DoubleAnimationUsingKeyFrames>
        </Storyboard>

			</ControlTemplate.Resources>
			<StackPanel x:Name="stackPanel" RenderTransformOrigin="0.5,0.5" Margin="15,6,15,2" Visibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Disabled" Width="{TemplateBinding Width}">
				<StackPanel.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1" ScaleY="1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="0"/>
						<TranslateTransform X="0" Y="0"/>
					</TransformGroup>
				</StackPanel.RenderTransform>
<!--
				<StackPanel.ContextMenu>
					<ContextMenu Background="#FF666666" HasDropShadow="True" BorderThickness="0" Opacity="40">
						<ListBoxItem Content="Reply to..."/>
						<ListBoxItem Content="Direct message"/>
					</ContextMenu>
				</StackPanel.ContextMenu>
-->
				<Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center">
					<Grid.ColumnDefinitions>
						<ColumnDefinition  Width="64" x:Name="ImageColumnDefinition" />
						<ColumnDefinition  Width="*"  x:Name="StatusColumnDefinition" />
					</Grid.ColumnDefinitions>
					<Rectangle x:Name="rectangle" Opacity=".4" StrokeThickness="3" Fill="{DynamicResource BackgroundGradientBrush}" Stroke="{DynamicResource ElementBorderBrush}" RadiusX="8" RadiusY="8" Width="Auto" Height="Auto" Grid.ColumnSpan="2"/>
					<Image Source="{Binding Path=User.ProfileImage, Mode=OneWay}" x:Name="Image" Margin="{Binding Path=Margin, ElementName=ImageRectangle, Mode=Default}" Width="{Binding Path=Width, ElementName=ImageRectangle, Mode=Default}" Height="{Binding Path=Height, ElementName=ImageRectangle, Mode=Default}" Stretch="Uniform" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Clip="{Binding Path=RenderedGeometry, ElementName=ImageRectangle, Mode=Default}"/>
					<Rectangle x:Name="ImageRectangle" RadiusX="8" RadiusY="8" Margin="8,0,0,0" Stroke="{DynamicResource ElementBGBrush}" Width="56" Height="56" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stretch="Fill" ScrollViewer.VerticalScrollBarVisibility="Disabled" StrokeThickness="0"/>
					<StackPanel Grid.Column="1" Margin="5,0,0,0">
							<TextBlock Foreground="White" Text="{Binding Path=Text, Mode=OneWay}" Width="250" Height="42" TextWrapping="Wrap" ScrollViewer.CanContentScroll="True" Margin="0,5,5,0" x:Name="StatusText"/>
							<TextBlock Foreground="White" Text="{Binding Path=User.Name, Mode=OneWay}" FontWeight="Bold" HorizontalAlignment="Stretch" x:Name="Name" Width="Auto" Margin="0,0,0,2"/>
							<TextBlock Foreground="White" Text="{Binding Path=CreateTimeText, Mode=OneWay}" FontWeight="Bold" x:Name="Time" Width="Auto" HorizontalAlignment="Stretch" Height="Auto" Margin="0,0,0,5"/>
					</StackPanel>
				</Grid>
			</StackPanel>
			<ControlTemplate.Triggers>
				<Trigger Property="IsMouseOver" Value="True">
					<Trigger.EnterActions>
						<BeginStoryboard x:Name="Expander_BeginStoryboard" Storyboard="{StaticResource Expander}"/>
					</Trigger.EnterActions>
					<Trigger.ExitActions>
						<RemoveStoryboard BeginStoryboardName="Expander_BeginStoryboard"/>
					</Trigger.ExitActions>
				</Trigger>
			</ControlTemplate.Triggers>
		</ControlTemplate>
    	<ControlTemplate x:Key="WindowTemplateKey" TargetType="{x:Type Window}">
    		<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
    			<Grid>
    				<AdornerDecorator>
    					<ContentPresenter/>
    				</AdornerDecorator>
    				<ResizeGrip Visibility="Visible" HorizontalAlignment="Right" x:Name="WindowResizeGrip" VerticalAlignment="Bottom" IsTabStop="false" Margin="0,0,25,0" Background="{x:Null}"/>
    			</Grid>
    		</Border>
    		<ControlTemplate.Triggers>
    			<MultiTrigger>
    				<MultiTrigger.Conditions>
    					<Condition Property="ResizeMode" Value="CanResizeWithGrip"/>
    					<Condition Property="WindowState" Value="Normal"/>
    				</MultiTrigger.Conditions>
    				<Setter Property="Visibility" TargetName="WindowResizeGrip" Value="Visible"/>
    			</MultiTrigger>
    		</ControlTemplate.Triggers>
    	</ControlTemplate>
    	<Style x:Key="BaseWindow" TargetType="{x:Type Window}">
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Window}">
    					<Border BorderThickness="{TemplateBinding BorderThickness}" Opacity="1" CornerRadius="15,15,15,15">
    						<AdornerDecorator Opacity="1">
    							<ContentPresenter/>
    						</AdornerDecorator>
    					</Border>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
			<Setter Property="FontFamily" Value="Calibri"/>
    		<Style.Triggers>
    			<Trigger Property="ResizeMode" Value="CanResizeWithGrip">
    				<Setter Property="Template" Value="{StaticResource WindowTemplateKey}"/>
    			</Trigger>
    		</Style.Triggers>
    	</Style>
		<!-- Colors -->
		<LinearGradientBrush x:Key="BackgroundGradientBrush" EndPoint="1,0.5" StartPoint="0,0.5">
			<GradientStop Color="#FF7D7979" Offset="0"/>
			<GradientStop Color="#FFC8C1C1" Offset="1"/>
			<GradientStop Color="#FF413F3F" Offset="0.215"/>
		</LinearGradientBrush>
    	<SolidColorBrush x:Key="MainBGBrush" Color="#FF2E2E2E"/>
		<SolidColorBrush x:Key="ElementBorderBrush" Color="#FF000000"/>
		<SolidColorBrush x:Key="ElementBorderHighlightBrush" Color="#FFA0A0A0"/>
		<SolidColorBrush x:Key="ElementBGBrush" Color="#FF666666"/>
		<SolidColorBrush x:Key="ElementBGHighlightBrush" Color="#FF343434"/>
    	<Style x:Key="StatusListViewer" TargetType="{x:Type ListView}">
    		<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type ListView}">
    					<StackPanel Margin="0,0,0,0">
    						<ScrollViewer Focusable="false" Padding="{TemplateBinding Padding}">
    							<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="0,0,0,0" ScrollViewer.HorizontalScrollBarVisibility="Auto" x:Name="itemsPresenter"/>
    						</ScrollViewer>
    					</StackPanel>
						<ControlTemplate.Triggers>
    						<Trigger Property="IsGrouping" Value="true">
    							<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    		<Setter Property="BorderThickness" Value="0,0,0,0"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    	</Style>
    	<Storyboard x:Key="ButtonHover">
    		<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
    			<SplineColorKeyFrame KeyTime="00:00:00.0200000" Value="#FF343434"/>
    		</ColorAnimationUsingKeyFrames>
    	</Storyboard>
    	<Storyboard x:Key="ButtonPress">
    		<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Grid">
    			<SplineDoubleKeyFrame KeyTime="00:00:00.0200000" Value="0.6"/>
    		</DoubleAnimationUsingKeyFrames>
    	</Storyboard>
    	<Style x:Key="SystemButton" TargetType="{x:Type Button}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
    					<ControlTemplate.Resources>
    						<Storyboard x:Key="ButtonPress">
    							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Grid">
    								<SplineDoubleKeyFrame KeyTime="00:00:00.0200000" Value="0.6"/>
    							</DoubleAnimationUsingKeyFrames>
    						</Storyboard>
							<Storyboard x:Key="ButtonHover"/>
    					</ControlTemplate.Resources>
    					<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" RenderTransformOrigin="0,0" HorizontalAlignment="Stretch" x:Name="Grid" VerticalAlignment="Stretch">
    						<Grid.RenderTransform>
    							<TransformGroup>
    								<ScaleTransform ScaleX="1" ScaleY="1"/>
    								<SkewTransform AngleX="0" AngleY="0"/>
    								<RotateTransform Angle="0"/>
    								<TranslateTransform X="0" Y="0"/>
    							</TransformGroup>
    						</Grid.RenderTransform>
    						<Ellipse Stroke="{x:Null}" StrokeThickness="3" HorizontalAlignment="Stretch" Margin="0,0,0,0" Opacity="1" x:Name="ellipse" Panel.ZIndex="0" Fill="#FF000000"/>
    						<Path RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="{DynamicResource ElementBGBrush}" StrokeThickness="5" Margin="0,0,0,0" Data="M47.5,2.5 L2.5,47.500001 M2.5,2.5 L47.5,47.500001">
    							<Path.RenderTransform>
    								<TransformGroup>
    									<ScaleTransform ScaleX="0.5" ScaleY="0.5"/>
    									<SkewTransform AngleX="0" AngleY="0"/>
    									<RotateTransform Angle="0"/>
    									<TranslateTransform X="0" Y="0"/>
    								</TransformGroup>
    							</Path.RenderTransform>
    						</Path>
    					</Grid>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsMouseOver" Value="True" SourceName="Grid">
    							<Trigger.EnterActions>
    								<BeginStoryboard x:Name="ButtonHover_BeginStoryboard" Storyboard="{StaticResource ButtonHover}"/>
    							</Trigger.EnterActions>
    							<Trigger.ExitActions>
    								<RemoveStoryboard BeginStoryboardName="ButtonHover_BeginStoryboard"/>
    							</Trigger.ExitActions>
    						</Trigger>
    						<Trigger Property="IsPressed" Value="True">
    							<Trigger.EnterActions>
    								<BeginStoryboard x:Name="ButtonPress_BeginStoryboard" Storyboard="{StaticResource ButtonPress}"/>
    							</Trigger.EnterActions>
    							<Trigger.ExitActions>
    								<RemoveStoryboard BeginStoryboardName="ButtonPress_BeginStoryboard"/>
    							</Trigger.ExitActions>
    						</Trigger>
    						<Trigger Property="ToggleButton.IsChecked" Value="true"/>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="MinimizeButton" TargetType="{x:Type Button}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
    					<ControlTemplate.Resources>
    						<Storyboard x:Key="ButtonPress">
    							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Grid">
    								<SplineDoubleKeyFrame KeyTime="00:00:00.0200000" Value="0.6"/>
    							</DoubleAnimationUsingKeyFrames>
    						</Storyboard>
							<Storyboard x:Key="ButtonHover"/>
    					</ControlTemplate.Resources>
    					<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" RenderTransformOrigin="0,0" HorizontalAlignment="Stretch" x:Name="Grid" VerticalAlignment="Stretch">
    						<Grid.RenderTransform>
    							<TransformGroup>
    								<ScaleTransform ScaleX="1" ScaleY="1"/>
    								<SkewTransform AngleX="0" AngleY="0"/>
    								<RotateTransform Angle="0"/>
    								<TranslateTransform X="0" Y="0"/>
    							</TransformGroup>
    						</Grid.RenderTransform>
    						<Ellipse Stroke="{x:Null}" StrokeThickness="3" HorizontalAlignment="Stretch" Margin="0,0,0,0" Opacity="1" x:Name="ellipse" Panel.ZIndex="0" Fill="#FF000000"/>
    						<Path RenderTransformOrigin="0.5,0.5" Stretch="Fill" Stroke="{DynamicResource ElementBGBrush}" StrokeThickness="5" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Center" Height="5" Data="M16,14 L103.09191,14">
    							<Path.RenderTransform>
    								<TransformGroup>
    									<ScaleTransform ScaleX="0.5" ScaleY="0.5"/>
    									<SkewTransform AngleX="0" AngleY="0"/>
    									<RotateTransform Angle="0"/>
    									<TranslateTransform X="0" Y="0"/>
    								</TransformGroup>
    							</Path.RenderTransform>
    						</Path>
    					</Grid>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsMouseOver" Value="True" SourceName="Grid">
    							<Trigger.EnterActions>
    								<BeginStoryboard x:Name="ButtonHover_BeginStoryboard" Storyboard="{StaticResource ButtonHover}"/>
    							</Trigger.EnterActions>
    							<Trigger.ExitActions>
    								<RemoveStoryboard BeginStoryboardName="ButtonHover_BeginStoryboard"/>
    							</Trigger.ExitActions>
    						</Trigger>
    						<Trigger Property="IsPressed" Value="True">
    							<Trigger.EnterActions>
    								<BeginStoryboard x:Name="ButtonPress_BeginStoryboard" Storyboard="{StaticResource ButtonPress}"/>
    							</Trigger.EnterActions>
    							<Trigger.ExitActions>
    								<RemoveStoryboard BeginStoryboardName="ButtonPress_BeginStoryboard"/>
    							</Trigger.ExitActions>
    						</Trigger>
    						<Trigger Property="ToggleButton.IsChecked" Value="true"/>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="HomeButtonStyle" TargetType="{x:Type Button}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
    					<ControlTemplate.Resources>
    						<Storyboard x:Key="ButtonPress">
    							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Grid">
    								<SplineDoubleKeyFrame KeyTime="00:00:00.0200000" Value="0.6"/>
    							</DoubleAnimationUsingKeyFrames>
    						</Storyboard>
							<Storyboard x:Key="ButtonHover">
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)">
									<SplineColorKeyFrame KeyTime="00:00:00.0200000" Value="#FF343434"/>
								</ColorAnimationUsingKeyFrames>
							</Storyboard>
    					</ControlTemplate.Resources>
    					<Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Stretch" x:Name="Grid" VerticalAlignment="Stretch">
    						<Grid.RenderTransform>
    							<TransformGroup>
    								<ScaleTransform ScaleX="1" ScaleY="1"/>
    								<SkewTransform AngleX="0" AngleY="0"/>
    								<RotateTransform Angle="0"/>
    								<TranslateTransform X="0" Y="0"/>
    							</TransformGroup>
    						</Grid.RenderTransform>
    						<Ellipse Stroke="{DynamicResource ElementBorderBrush}" StrokeThickness="3" Fill="{DynamicResource ElementBGBrush}" HorizontalAlignment="Stretch" Margin="0,0,0,0" Opacity="0.4" x:Name="ellipse" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Panel.ZIndex="0"/>
    						<Image HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" RenderTransformOrigin="0.5,0.5" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Grid.IsSharedSizeScope="False" Source="Images\Home.ico" ScrollViewer.CanContentScroll="False" x:Name="image" Panel.ZIndex="0">
    							<Image.RenderTransform>
    								<TransformGroup>
    									<ScaleTransform ScaleX="0.6" ScaleY="0.6"/>
    									<SkewTransform AngleX="0" AngleY="0"/>
    									<RotateTransform Angle="0"/>
    									<TranslateTransform X="0" Y="0"/>
    								</TransformGroup>
    							</Image.RenderTransform>
    						</Image>
    					</Grid>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsMouseOver" Value="True" SourceName="Grid">
    							<Trigger.EnterActions>
    								<BeginStoryboard x:Name="ButtonHover_BeginStoryboard" Storyboard="{StaticResource ButtonHover}"/>
    							</Trigger.EnterActions>
    							<Trigger.ExitActions>
    								<RemoveStoryboard BeginStoryboardName="ButtonHover_BeginStoryboard"/>
    							</Trigger.ExitActions>
    						</Trigger>
    						<Trigger Property="IsPressed" Value="True">
    							<Trigger.EnterActions>
    								<BeginStoryboard x:Name="ButtonPress_BeginStoryboard" Storyboard="{StaticResource ButtonPress}"/>
    							</Trigger.EnterActions>
    							<Trigger.ExitActions>
    								<RemoveStoryboard BeginStoryboardName="ButtonPress_BeginStoryboard"/>
    							</Trigger.ExitActions>
    						</Trigger>
    						<Trigger Property="ToggleButton.IsChecked" Value="true"/>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="SliderRepeatButtonStyle" TargetType="{x:Type RepeatButton}">
    		<Setter Property="OverridesDefaultStyle" Value="true"/>
    		<Setter Property="IsTabStop" Value="false"/>
    		<Setter Property="Focusable" Value="false"/>
    		<Setter Property="Background" Value="Transparent"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type RepeatButton}">
    					<Border Background="{TemplateBinding Background}"/>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="HorizontalSliderThumbStyle" TargetType="{x:Type Thumb}">
    		<Setter Property="OverridesDefaultStyle" Value="true"/>
    		<Setter Property="Foreground" Value="{x:Null}"/>
    		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
    		<Setter Property="Height" Value="21"/>
    		<Setter Property="Width" Value="11"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Thumb}">
    					<Microsoft_Windows_Themes:ClassicBorderDecorator Background="{TemplateBinding Background}" BorderBrush="{x:Static Microsoft_Windows_Themes:ClassicBorderDecorator.ClassicBorderBrush}" BorderStyle="Raised" BorderThickness="3">
    						<Rectangle Opacity="0.5" Fill="{TemplateBinding Foreground}" Margin="-1" x:Name="ForegroundRect"/>
    					</Microsoft_Windows_Themes:ClassicBorderDecorator>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsDragging" Value="true">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="HorizontalSliderUpThumbStyle" TargetType="{x:Type Thumb}">
    		<Setter Property="OverridesDefaultStyle" Value="true"/>
    		<Setter Property="Foreground" Value="{x:Null}"/>
    		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
    		<Setter Property="Height" Value="21"/>
    		<Setter Property="Width" Value="11"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Thumb}">
    					<Canvas SnapsToDevicePixels="true">
    						<Path Fill="{TemplateBinding Background}" Data="M 11 21 L 0 21 L 0 6 L 5 1 L 6 1 L 11 6 z"/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" StrokeThickness="1.0" Data="M 0.5 20 L 0.5 5.5 L 5 0.5 L 5.5 0.5"/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Data="M 5.5 0.5 L 6 0.5 L 10.5 5.5 L 10.5 20.5 L 0 20.5"/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}" StrokeThickness="1.0" Data="M 1.5 19 L 1.5 5.5 L 5 1.5 L 5.5 1.5"/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" StrokeThickness="1.0" Data="M 5.5 1.5 L 6 1.5 L 9.5 5.5 L 9.5 19.5 L 1.0 19.5"/>
    						<Path Opacity="0.5" Fill="{TemplateBinding Foreground}" Data="M 9 19 L 2 19 L 2 6 L 5.5 2 L 9 6 z"/>
    					</Canvas>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsDragging" Value="true">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="HorizontalSliderDownThumbStyle" TargetType="{x:Type Thumb}">
    		<Setter Property="OverridesDefaultStyle" Value="true"/>
    		<Setter Property="Foreground" Value="{x:Null}"/>
    		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
    		<Setter Property="Height" Value="21"/>
    		<Setter Property="Width" Value="11"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Thumb}">
    					<Canvas SnapsToDevicePixels="true">
    						<Path Fill="{TemplateBinding Background}" Data="M 11 0 L 0 0 L 0 15 L 5 21 L 6 21 L 11 15 z"/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" StrokeThickness="1.0" Data="M 10 0.5 L 0.5 0.5 L 0.5 15.5 L 5 20.5 L 5.5 20.5"/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Data="M 5.5 20.5 L 6 20.5 L 10.5 15.5 L 10.5 0"/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}" StrokeThickness="1.0" Data="M 9 1.5 L 1.5 1.5 L 1.5 15.5 L 5 19.5 L 5.5 19.5"/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" StrokeThickness="1.0" Data="M 5.5 19.5 L 6 19.5 L 9.5 15.5 L 9.5 1"/>
    						<Path Opacity="0.5" Fill="{TemplateBinding Foreground}" Data="M 9 2 L 2 2 L 2 15 L 5.5 19 L 9 15 z"/>
    					</Canvas>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsDragging" Value="true">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="VerticalSliderThumbStyle" TargetType="{x:Type Thumb}">
    		<Setter Property="OverridesDefaultStyle" Value="true"/>
    		<Setter Property="Foreground" Value="{x:Null}"/>
    		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
    		<Setter Property="Width" Value="21"/>
    		<Setter Property="Height" Value="11"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Thumb}">
    					<Microsoft_Windows_Themes:ClassicBorderDecorator Background="{TemplateBinding Background}" BorderBrush="{x:Static Microsoft_Windows_Themes:ClassicBorderDecorator.ClassicBorderBrush}" BorderStyle="Raised" BorderThickness="3">
    						<Rectangle Opacity="0.5" Fill="{TemplateBinding Foreground}" Margin="-1"/>
    					</Microsoft_Windows_Themes:ClassicBorderDecorator>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsDragging" Value="true">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="VerticalSliderLeftThumbStyle" TargetType="{x:Type Thumb}">
    		<Setter Property="OverridesDefaultStyle" Value="true"/>
    		<Setter Property="Foreground" Value="{x:Null}"/>
    		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
    		<Setter Property="Width" Value="21"/>
    		<Setter Property="Height" Value="11"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Thumb}">
    					<Canvas SnapsToDevicePixels="true">
    						<Path Fill="{TemplateBinding Background}" Data="M 21 11 L 21 0 L 6 0 L 0 5 L 0 6 L 6 11 z"/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" StrokeThickness="1.0" Data="M 20 0.5 L 5.5 0.5 L 0.5 5 L 0.5 5.5 "/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Data="M 0.5 5.5 L 0.5 6 L 5.5 10.5 L 20.5 10.5 L 20.5 0 "/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}" StrokeThickness="1.0" Data="M 19 1.5 L 5.5 1.5 L 1.5 5 L 1.5 5.5 "/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" StrokeThickness="1.0" Data="M 1.5 5.5 L 1.5 6 L 5.5 9.5 L 19.5 9.5 L 19.5 1.0 "/>
    						<Path Opacity="0.5" Fill="{TemplateBinding Foreground}" Data="M 19 9 L 19 2 L 6 2 L 2 5.5 L 6 9 z"/>
    					</Canvas>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsDragging" Value="true">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="VerticalSliderRightThumbStyle" TargetType="{x:Type Thumb}">
    		<Setter Property="OverridesDefaultStyle" Value="true"/>
    		<Setter Property="BorderThickness" Value="0,0,0,0"/>
    		<Setter Property="Foreground" Value="{x:Null}"/>
    		<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
    		<Setter Property="Width" Value="21"/>
    		<Setter Property="Height" Value="11"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Thumb}">
    					<Canvas SnapsToDevicePixels="true">
    						<Path Fill="{TemplateBinding Background}" Data="M 0 11 L 0 0 L 15 0 L 21 5 L 21 6 L 15 11 z"/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" StrokeThickness="1.0" Data="M 0.5 10 L 0.5 0.5 L 15.5 0.5 L 20.5 5 L 20.5 5.5 "/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" StrokeThickness="1.0" Data="M 20.5 5.5 L 20.5 6 L 15.5 10.5 L 0 10.5 "/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}" StrokeThickness="1.0" Data="M 1.5 9 L 1.5 1.5 L 15.5 1.5 L 19.5 5 L 19.5 5.5 "/>
    						<Path Stroke="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" StrokeThickness="1.0" Data="M 19.5 5.5 L 19.5 6 L 15.5 9.5 L 1 9.5 "/>
    						<Path Opacity="0.5" Fill="{TemplateBinding Foreground}" Data="M 2 9 L 2 2 L 15 2 L 19 5.5 L 15 9 "/>
    					</Canvas>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsDragging" Value="true">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<Style x:Key="SliderStyle" TargetType="{x:Type Slider}">
    		<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
    		<Setter Property="Background" Value="Transparent"/>
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Slider}">
    					<Border Width="{TemplateBinding Width}" Background="{DynamicResource MainBGBrush}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
    						<Grid>
    							<Grid.ColumnDefinitions>
    								<ColumnDefinition Width="*"/>
    							</Grid.ColumnDefinitions>
    							<Grid.RowDefinitions>
    								<RowDefinition Height="Auto"/>
    								<RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
    								<RowDefinition Height="Auto"/>
    							</Grid.RowDefinitions>
    							<TickBar Visibility="Collapsed" x:Name="TopTick" Height="4" Fill="{TemplateBinding Foreground}" Placement="Top"/>
    							<Microsoft_Windows_Themes:ClassicBorderDecorator Margin="0,0,0,1" x:Name="TrackBackground" Height="4" Grid.Row="1" BorderBrush="{x:Static Microsoft_Windows_Themes:ClassicBorderDecorator.ClassicBorderBrush}" BorderStyle="Sunken" BorderThickness="2">
    								<Canvas Margin="-2">
    									<Rectangle Visibility="Hidden" Fill="{DynamicResource ElementBorderHighlightBrush}" x:Name="PART_SelectionRange" Height="4.0"/>
    								</Canvas>
    							</Microsoft_Windows_Themes:ClassicBorderDecorator>
    							<Track x:Name="PART_Track" Grid.Row="1">
    								<Track.DecreaseRepeatButton>
    									<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.DecreaseLarge}"/>
    								</Track.DecreaseRepeatButton>
    								<Track.IncreaseRepeatButton>
    									<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.IncreaseLarge}"/>
    								</Track.IncreaseRepeatButton>
    								<Track.Thumb>
    									<Thumb x:Name="Thumb" Style="{StaticResource HorizontalSliderThumbStyle}" Background="{DynamicResource ElementBGBrush}"/>
    								</Track.Thumb>
    							</Track>
    							<TickBar Visibility="Collapsed" x:Name="BottomTick" Height="4" Grid.Row="2" Fill="{TemplateBinding Foreground}" Placement="Bottom"/>
    						</Grid>
    					</Border>
    					<ControlTemplate.Triggers>
    						<Trigger Property="TickPlacement" Value="TopLeft">
    							<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
    							<Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderUpThumbStyle}"/>
    							<Setter Property="Margin" TargetName="TrackBackground" Value="0,3,0,0"/>
    						</Trigger>
    						<Trigger Property="TickPlacement" Value="BottomRight">
    							<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
    							<Setter Property="Style" TargetName="Thumb" Value="{StaticResource HorizontalSliderDownThumbStyle}"/>
    							<Setter Property="Margin" TargetName="TrackBackground" Value="0,0,0,3"/>
    						</Trigger>
    						<Trigger Property="TickPlacement" Value="Both">
    							<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
    							<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
    						</Trigger>
    						<Trigger Property="IsSelectionRangeEnabled" Value="true">
    							<Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    		<Style.Triggers>
    			<Trigger Property="Orientation" Value="Vertical">
    				<Setter Property="Template">
    					<Setter.Value>
    						<ControlTemplate TargetType="{x:Type Slider}">
    							<Border Height="{TemplateBinding Height}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
    								<Grid>
    									<Grid.ColumnDefinitions>
    										<ColumnDefinition Width="Auto"/>
    										<ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
    										<ColumnDefinition Width="Auto"/>
    									</Grid.ColumnDefinitions>
    									<Grid.RowDefinitions>
    										<RowDefinition Height="*"/>
    									</Grid.RowDefinitions>
    									<TickBar Visibility="Collapsed" x:Name="LeftTick" Width="4" Fill="{TemplateBinding Foreground}" Placement="Left"/>
    									<Microsoft_Windows_Themes:ClassicBorderDecorator Margin="0,0,1,0" x:Name="TrackBackground" Width="4" Grid.Column="1" BorderBrush="{x:Static Microsoft_Windows_Themes:ClassicBorderDecorator.ClassicBorderBrush}" BorderStyle="Sunken" BorderThickness="2">
    										<Canvas Margin="-2">
    											<Rectangle Visibility="Hidden" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" x:Name="PART_SelectionRange" Width="4.0"/>
    										</Canvas>
    									</Microsoft_Windows_Themes:ClassicBorderDecorator>
    									<Track x:Name="PART_Track" Grid.Column="1">
    										<Track.DecreaseRepeatButton>
    											<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.DecreaseLarge}"/>
    										</Track.DecreaseRepeatButton>
    										<Track.IncreaseRepeatButton>
    											<RepeatButton Style="{StaticResource SliderRepeatButtonStyle}" Command="{x:Static Slider.IncreaseLarge}"/>
    										</Track.IncreaseRepeatButton>
    										<Track.Thumb>
    											<Thumb x:Name="Thumb" Style="{StaticResource VerticalSliderThumbStyle}"/>
    										</Track.Thumb>
    									</Track>
    									<TickBar Visibility="Collapsed" x:Name="RightTick" Width="4" Grid.Column="2" Grid.RowSpan="3" Fill="{TemplateBinding Foreground}" Placement="Right"/>
    								</Grid>
    							</Border>
    							<ControlTemplate.Triggers>
    								<Trigger Property="TickPlacement" Value="TopLeft">
    									<Setter Property="Visibility" TargetName="LeftTick" Value="Visible"/>
    									<Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderLeftThumbStyle}"/>
    									<Setter Property="Margin" TargetName="TrackBackground" Value="3,0,0,0"/>
    								</Trigger>
    								<Trigger Property="TickPlacement" Value="BottomRight">
    									<Setter Property="Visibility" TargetName="RightTick" Value="Visible"/>
    									<Setter Property="Style" TargetName="Thumb" Value="{StaticResource VerticalSliderRightThumbStyle}"/>
    									<Setter Property="Margin" TargetName="TrackBackground" Value="0,0,3,0"/>
    								</Trigger>
    								<Trigger Property="TickPlacement" Value="Both">
    									<Setter Property="Visibility" TargetName="LeftTick" Value="Visible"/>
    									<Setter Property="Visibility" TargetName="RightTick" Value="Visible"/>
    								</Trigger>
    								<Trigger Property="IsSelectionRangeEnabled" Value="true">
    									<Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
    								</Trigger>
    							</ControlTemplate.Triggers>
    						</ControlTemplate>
    					</Setter.Value>
    				</Setter>
    			</Trigger>
    		</Style.Triggers>
    	</Style>
    	<Style x:Key="ScrollButton" TargetType="{x:Type Button}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    		<Setter Property="BorderBrush" Value="{DynamicResource ElementBorderBrush}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
    					<Microsoft_Windows_Themes1:ButtonChrome SnapsToDevicePixels="true" x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}" RenderDefaulted="{TemplateBinding IsDefaulted}" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}" ThemeColor="Metallic">
    						<ContentPresenter RenderTransformOrigin="0.5,0.5" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" RecognizesAccessKey="True">
    							<ContentPresenter.RenderTransform>
    								<TransformGroup>
    									<ScaleTransform ScaleX="1" ScaleY="1"/>
    									<SkewTransform AngleX="0" AngleY="0"/>
    									<RotateTransform Angle="90"/>
    									<TranslateTransform X="0" Y="0"/>
    								</TransformGroup>
    							</ContentPresenter.RenderTransform>
    						</ContentPresenter>
    					</Microsoft_Windows_Themes1:ButtonChrome>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsKeyboardFocused" Value="true">
    							<Setter Property="RenderDefaulted" TargetName="Chrome" Value="true"/>
    						</Trigger>
    						<Trigger Property="ToggleButton.IsChecked" Value="true">
    							<Setter Property="RenderPressed" TargetName="Chrome" Value="true"/>
    						</Trigger>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    		<Setter Property="Background" Value="{DynamicResource ElementBGBrush}"/>
    		<Setter Property="Foreground" Value="#FFFFFFFF"/>
    		<Setter Property="FontWeight" Value="Bold"/>
    		<Setter Property="FontSize" Value="14"/>
    		<Setter Property="FontFamily" Value="Arial"/>
    		<Style.Triggers>
    			<Trigger Property="IsMouseOver" Value="True"/>
    		</Style.Triggers>
    	</Style>
    </Application.Resources>
</Application>
